﻿// ---------------------------------------------------------------------------------------------
// <copyright file="CommandLineAliasAttribute.cs" company="Swyx Solutions AG">
//     (c) Swyx Solutions AG
//     Original code (c) Ray Hayes (http://www.codeproject.com/KB/recipes/commandlineparser.aspx),
//     licensed under The code project open license (http://www.codeproject.com/info/cpol10.aspx)
// </copyright>
// <summary>Type ImportRR which implements SwyxWare routing record import</summary>
// ---------------------------------------------------------------------------------------------
namespace RJH.CommandLineHelper
{
    using System;

    /// <summary>
    /// This class implements an alias attribute to work in conjunction
    /// with the <see cref="CommandLineSwitchAttribute">CommandLineSwitchAttribute</see>
    /// attribute.  If the CommandLineSwitchAttribute exists, then this attribute
    /// defines an alias for it.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class CommandLineAliasAttribute : System.Attribute
    {
        #region Private Variables
        /// <summary>
        /// Command line alias
        /// </summary>
        private string alias = "";
        #endregion

        #region Constructors
        /// <summary>
        /// Creates a CommandLineAliasAttribute object
        /// </summary>
        /// <param name="alias">Command line alias name</param>
        public CommandLineAliasAttribute(string alias)
        {
            this.alias = alias;
        }
        #endregion
        #region Public Properties
        /// <summary>
        /// Gets command line alias
        /// </summary>
        public string Alias
        {
            get { return this.alias; }
        }

        #endregion
    }
}